package org.geekbang.projects.cs.im.protocol;

/**
 * @description:
 * @author: Kaijun Chen
 * @date: 2023/3/5
 */
public interface Serializer {

    /**
     * 徐磊话算法
     * @return
     */
    byte getSerializerAlgorithm();

    /**
     * 将对象序列化
     * @param object
     * @return
     */
    byte[] serialize(Object object);

    <T> T deSerialize(Class<T> clazz, byte[] bytes);

}
